<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class StoreCart extends Model
{
    use HasFactory;
    protected $table="store_cart";
    protected $guarded=[];

    /**
     * User: YKY
     * DateTime: 2022/11/22 14:06
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     * 购物车表关联商品表
     */
    public function getGoods(){
        return $this->hasOne(StoreGoods::class,'id','product_id');
    }
}
